package com.briup.jz.web.controller;

import com.briup.jz.bean.extend.PrivilegeExtend;
import com.briup.jz.service.IPrivilegeService;
import com.briup.jz.utils.Message;
import com.briup.jz.utils.MessageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ProjectName: jz
 * @Author: xjs
 * @Description: 权限控制类
 * @Date: 2020/6/14 11:37
 */
@RestController
@RequestMapping("/privilege")
@Api(description = "权限管理接口")
public class PrivilegeController {

    @Autowired
    private IPrivilegeService privilegeService;

    @ApiOperation(value = "查找全部权限及其子权限")
    @GetMapping("findAlByTree")
    public Message findAlByTree(){
        return MessageUtil.success(privilegeService.findAllByTree());
    }


}
